import {IsNotEmpty, IsOptional} from 'class-validator';
import { ApiProperty } from "@nestjs/swagger";

export class LoginLogAddDto {
  @ApiProperty({
    description: '登陆id',
    type:String,
  })
  @IsNotEmpty({ message: 'ip不允许为空' })
  ip: string;

  @ApiProperty({
    description: '用户id',
    type:Number,
  })
  @IsOptional({ message: '用户id' })
  uid: string|number;

  @ApiProperty({
    description: '操作系统',
    type:String,
  })
  @IsOptional()
  operationSystem: string;

  @ApiProperty({
    description: '操作浏览器',
    type:String,
  })
  @IsOptional()
  browser: any;

  @ApiProperty({
    description: '电话操作，手机操作',
    type:Number,
  })
  @IsOptional()
  isPcOrIphone: number;

  @ApiProperty({
    description: '状态',
    type:Number,
  })
  @IsOptional({message:"登陆状态"})
  status: number;

}
